//
//  ViewController.m
//  PictureInfinite
//
//  Created by jxf on 16/2/21.
//  Copyright © 2016年 JJ.sevn. All rights reserved.
//

#import "ViewController.h"
#import "JJPictureInfiniteView.h"

@interface ViewController ()<JJPictureInfiniteViewDelegate>

@end

@implementation ViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    
    JJPictureInfiniteView *infiniteView = [[JJPictureInfiniteView alloc] init];
    infiniteView.delegate = self;
    infiniteView.frame = CGRectMake(0, 0, self.view.frame.size.width, 250);
    [self.view addSubview:infiniteView];
    infiniteView.images = @[
                          [UIImage imageNamed:@"image0"],
                          [UIImage imageNamed:@"image1"],
                          [UIImage imageNamed:@"image2"],
                          [UIImage imageNamed:@"image3"],
                          ];
}

- (void)pictureInfiniteView:(JJPictureInfiniteView *)pictureInfiniteView didClickedImageViewAtIndex:(NSInteger)index
{
    NSLog(@"点击了第%zd张图", index);
}

@end
